
#ifndef AFTERMATH_LIMITS_HPP_INCLUDED
#define AFTERMATH_LIMITS_HPP_INCLUDED

#include <cstdint>

namespace aftermath
{
    template <typename T>
    struct numeric_limits
    {
        static const T min;
        static const T max;
    };

    template <>
    struct numeric_limits<std::uint8_t>
    {
        static const std::uint8_t min = 0x00;
        static const std::uint8_t max = 0xFF;
    };

    template <>
    struct numeric_limits<std::uint16_t>
    {
        static const std::uint16_t min = 0x0000;
        static const std::uint16_t max = 0xFFFF;
    };

    template <>
    struct numeric_limits<std::uint32_t>
    {
        static const std::uint32_t min = 0x00000000U;
        static const std::uint32_t max = 0xFFFFFFFFU;
    };

    template <>
    struct numeric_limits<std::uint64_t>
    {
        static const std::uint64_t min = 0x0000000000000000UL;
        static const std::uint64_t max = 0xFFFFFFFFFFFFFFFFUL;
    };

    //template <>
    //struct numeric_limits<std::int8_t>
    //{
    //    static const std::int8_t min = 0x80;
    //    static const std::int8_t max = 0x7F;
    //};

    //template <>
    //struct numeric_limits<std::int16_t>
    //{
    //    static const std::int16_t min = 0x8000;
    //    static const std::int16_t max = 0x7FFF;
    //};

    template <>
    struct numeric_limits<std::int32_t>
    {
        static const std::int32_t min = 0x80000000;
        static const std::int32_t max = 0x7FFFFFFF;
    };

    template <>
    struct numeric_limits<std::int64_t>
    {
        static const std::int64_t min = 0x8000000000000000L;
        static const std::int64_t max = 0x7FFFFFFFFFFFFFFFL;
    };
}

#endif // AFTERMATH_LIMITS_HPP_INCLUDED
